﻿  using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace W7
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("动物");
            Animal animal = new Animal();
            animal.Sport();
            animal.Voice();
            Console.WriteLine("猫科");
            Cattype cattype = new Cattype();
            cattype.Cry();
            cattype.Tial();
            Console.WriteLine("猫");
            Cat cat = new Cat();
            cat.Cry();
            cat.Clever();
            Console.WriteLine("虎");
            Tiger tiger = new Tiger();
            tiger.Cry();
            tiger.Strong();
            Console.WriteLine("鸟类");
            Bird bird = new Bird();
            bird.Plume();
            bird.Wing();
            Console.WriteLine("老鹰");
            Eagle eagle = new Eagle();
            eagle.Plume();
            eagle.Top();
            Console.WriteLine("燕子");
            Swallow swallow = new Swallow();
            swallow.Plume();
            swallow.Migrat();



        }
    }
    class Animal
    {
        public void Sport() {
            Console.WriteLine("我会运动");
        }
        public void Voice()
        {
            Console.WriteLine("我会表达");
        }

    }
    class Cattype : Animal
    {
        public virtual void Cry()
        {
            Console.WriteLine("我们会叫");
        }
        public void Tial() {
            Console.WriteLine("我们有很长的尾巴");
        }

    }
    class Bird : Animal
    {
        public void Wing() {
            Console.WriteLine("我们有翅膀");
        }
        public virtual void Plume() {
            Console.WriteLine("我们有羽毛");
        }
    }
    class Tiger : Cattype {
        public override void Cry() {
            Console.WriteLine("我会咆哮");
        }
        public void Strong() {
            Console.WriteLine("我很强壮");
        }

    }
    class Cat:Cattype {
        public void Clever() {
            Console.WriteLine("我很灵巧");
        }
        public override void Cry (){
            Console.WriteLine("我会喵喵叫");
        }

    }
    class Eagle : Bird {
        public override void Plume() {
            Console.WriteLine("我的翅膀是褐色的");

        }
        public void Top() {
            Console.WriteLine("我是站在食物链顶端的捕食者");
        }

    
    }
    class Swallow:Bird {
        public override void Plume()
        {
            Console.WriteLine("我的羽毛是黑色的");
        }
        public void Migrat() {
            Console.WriteLine("我有迁徙的习惯");
        }
    }
}
